package features;

import javax.swing.JOptionPane;
import javax.swing.JTextPane;

public class Find_Normal extends Find{
	
	public JTextPane textPane;
	
	public Find_Normal(JTextPane textPane){
		this.textPane = textPane;
	}

	public void find() {
		word = JOptionPane.showInputDialog("Type the word to find");
		findIndex = textPane.getText().indexOf(word);

		if (findIndex == -1) {
			show_word_not_find();
		} else {
			selectFound(textPane);
		}
	}
}
